package cn.walls1717.ggkt.order.controller;


import cn.walls1717.ggkt.model.order.OrderInfo;
import cn.walls1717.ggkt.order.service.OrderInfoService;
import cn.walls1717.ggkt.result.Result;
import cn.walls1717.ggkt.vo.order.OrderInfoQueryVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单相关接口
 *
 * @author walls1717
 * @since 2022/07/17
 */
@Api(tags = "订单相关接口")
@RestController
@RequestMapping("/admin/order/orderInfo")
public class OrderInfoController {
    @Autowired
    private OrderInfoService orderInfoService;

    @ApiOperation("订单列表")
    @GetMapping("{pageNum}/{pageSize}")
    public Result<Page<OrderInfo>> listPages(@PathVariable Integer pageNum,
                                             @PathVariable Integer pageSize,
                                             OrderInfoQueryVo orderInfoQueryVo) {
        Page<OrderInfo> pageInfo = orderInfoService.listPages(pageNum, pageSize, orderInfoQueryVo);
        return Result.success(pageInfo);
    }
}

